Fixed 'Render and Build' test#21
Merged
Arctis-Fireblight merged 1 commit intoFireblight-Studios:mainfrom Jan 9, 2026
Merged
Conversation
Test now looks for the rendered elements seperately to account for differences in serialization, since the exact output of `CalendarFull.Render()` can vary a little based on the exact date.
📝 WalkthroughWalkthroughThe test file Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In @src/classes/renderer/calendar-full.test.ts:
- Around line 57-59: The test relies on real time because
PredefinedCalendar.setToPredefined(tCal, PredefinedCalendars.Gregorian) sets
currentDate to new Date(); change the setup to inject a fixed deterministic date
(e.g., create a Date for a known month/year and assign it to tCal.currentDate or
use a PredefinedCalendar helper that accepts a seed date) so
CalendarFull.Render() always outputs the same month/year; also replace the
brittle partial class assertion on the rendered output (currently expecting
`class="fsc-month-year`) with a full HTML fragment match consistent with lines
63-77 (match the complete element/class string produced by CalendarFull.Render
instead of a substring).
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/classes/renderer/calendar-full.test.ts
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2026-01-08T08:30:38.842Z
Learnt from: Arctis-Fireblight
Repo: Fireblight-Studios/foundryvtt-simple-calendar PR: 20
File: src/classes/applications/configuration-app.ts:1870-1876
Timestamp: 2026-01-08T08:30:38.842Z
Learning: In the Fireblight-Studios/foundryvtt-simple-calendar fork, when importing journal entries from the legacy 'foundryvtt-simple-calendar' module that already exist in the world, prefer creating new journal entries with new IDs instead of updating existing ones. This avoids potential issues with lingering or 'dirty' legacy configuration data. Apply this approach specifically in the configuration/import logic (e.g., in src/classes/applications/configuration-app.ts) and ensure that existing entries are left untouched unless a mechanism explicitly clones and re-links references.
Applied to files:
src/classes/renderer/calendar-full.test.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Test now looks for the rendered elements seperately to account for differences in serialization, since the exact output of
CalendarFull.Render()can vary a little based on the exact date.Fixes #16
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.